home *** CD-ROM | disk | FTP | other *** search
- #include <string.h>
-
- /************************************************************************/
-
- #undef strtok
-
- char *strtok(char *s1, const char *s2)
-
- {
- static char *t;
-
- if (s1!=NULL)
- {
- t=s1;
- }
- else
- {
- s1=t;
- }
- s1+=strspn(s1,s2);
- if (*s1=='\0')
- {
- return NULL;
- }
- t=s1;
- t+=strcspn(s1,s2);
- if(*t!='\0')
- {
- *t++='\0';
- }
- return s1;
- }
-
-